
<style>
    .main {
        width: 80%;
        /*border: 1px solid #dc127b;*/
        margin: 0 auto;
        text-align: center;
    }

    h2 a {
        text-decoration: none;
        color: cadetblue;
        margin-right: 10px;
        /*text-shadow: 2px 2px 5px red;*/
    }

    h2 a:hover {
        text-decoration: underline;
        color: brown;
    }

    h2 a:last-child {
        margin-right: 0;
    }
    .current{
        color: brown;
    }
    .info{
        text-align: right;
        max-width: 545px;
        margin: 0 auto;
        font-size: 14px;
        color: gray;
    }
</style>
<H1>会员注册管理系统</H1>
<!--判断是否登录-->
<?php
if(isset($_SESSION['loggedUsername']) && $_SESSION['loggedUsername']){?>
<div class="info">欢迎 <?php echo $_SESSION['loggedUsername']?> ，<a href="logout.php">注销登录</a></div>
<?php
}
$navID = $_GET['navID'] ?? 1;
?>
<h2>
    <a href="index.php?navID=1" <?php if($navID == 1){echo 'class="current"';} ?>>回到首页</a>
    <a href="reg.php?navID=2" <?php if($navID == 2){echo 'class="current"';} ?>>会员注册</a>
    <a href="login.php?navID=3" <?php if($navID == 3){echo 'class="current"';} ?>>会员登录</a>
    <a href="# <?php if($navID == 4){echo 'class="current"';} ?>">资料修改</a>
    <a href="# <?php if($navID == 5){echo 'class="current"';} ?>">后台管理</a>
</h2>